package com.et.dao.impl;

import com.et.bean.EtUser;
import com.et.dao.UserDAO;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

@Repository
public class UserDAOImpl implements UserDAO {
    private static Map<Integer,EtUser> users = new HashMap<Integer, EtUser>();
    static {
        users.put(1,new EtUser(1,"zhang1","shenzhen1") );
        users.put(2,new EtUser(2,"zhang2","shenzhen2") );
        users.put(3,new EtUser(3,"zhang3","shenzhen3") );
    }
    @Override
    public EtUser get(Integer id) {
        return users.get(id);
    }
}
